<?php
set_time_limit(0);
error_reporting(0);
/**
 * ���������ļ�����Ҫ�������
 */
require_once('class.smtp.php');
require_once('class.phpmailer.php');


$usenana = '656297731@qq.com';
$subject = '超量预警';
$content ='乐视app成功下载量达到1000';

sendMail($usenana, $subject, $content);

/**
 *
 *
 * @return bool
 */
function sendMail ($mailto, $subject,  $content) {
	$mail = new PHPMailer(); //ʵ��һ��phpmailer����
	$mail->CharSet = "UTF-8";//ָ������
	$mail->Encoding = "base64";
	$mail->Port = '25';
	$mail->IsSMTP();         //ָ����������  ����Ŷһ�������� $mail->IsMail();
	$mail->Host = '124.202.152.216';
	$mail->SMTPAuth = true;
	$mail->Username = 'cs@ucenter.iiapple.com';
	$mail->Password = 'kXAkCzpws2XcpWYX';
	$mail->From = 'cs@ucenter.iiapple.com';
	$mail->FromName = 'I苹果用户中心';
	$mail->AddAddress($mailto);
	$mail->WordWrap = 500;
	$mail->IsHTML(true);
	$mail->Subject = $subject;
	$mail->Body = $content;
	//$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
	if(!$mail->Send()) {
		echo $mail->ErrorInfo;
        echo "123";
		return false;
	}else{
		return true;
	}
}